package com.exam.controller;

import com.netflix.appinfo.InstanceInfo;
import com.netflix.discovery.DiscoveryClient;
import com.netflix.discovery.converters.Auto;
import lombok.extern.log4j.Log4j;
import lombok.extern.log4j.Log4j2;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.client.serviceregistry.Registration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
public class DemoController {

    @RequestMapping("/hello")
    public String hello() {
        System.out.println("---------"+System.currentTimeMillis()+"----------");
        return "hello this is client";
    }
    @RequestMapping("/helloA")
    public String helloA() {
        System.out.println("---------"+System.currentTimeMillis()+"----------");
        return "visit error";
    }
    @RequestMapping("/helloB")
    public String helloB() {
        System.out.println("---------"+System.currentTimeMillis()+"----------");
        return "hello this is client";
    }
    @RequestMapping("/helloC")
    public String helloC() {
        System.out.println("---------"+System.currentTimeMillis()+"----------");
        return "visit error";
    }
}